In most computing systems, low level instruction code is used as an intermediary between the hardware components of the computing system and the operating software and other high level software executing on the computing system. In some computer systems, this low level instruction code is known as the Basic Input and Output System (“BIOS”). The BIOS provides a set of software routines that allow high level software to interact with the hardware components of the computing system using standard calls.
Because of limitations of the BIOS in many PC-compatible computers, a new specification for creating the firmware that is responsible for booting the computer and for intermediating the communication between the operating system and the hardware has been proposed. The new specification is called the Extensible Firmware Interface (“EFI”) specification and is available from INTEL CORPORATION.
The EFI specification describes an interface between the operating system and the system firmware. In particular, the EFI specification defines the interface that platform firmware must implement and the interface that the operating system may use in booting. How the firmware implements the interface is left up to the manufacturer of the firmware. The EFI specification provides protocols for EFI drivers to communicate with each other, and the EFI core provides functions such as allocation of memory, creating events, setting the clock, and many others. This is accomplished through a formal and complete abstract specification of the software-visible interface presented to the operating system by the platform and the firmware.
The EFI is capable of providing services to other applications. Services are implemented by modules that may be loaded by a boot loader when the EFI is started. Because certain services are dependent upon other services for their operation, some modules must be loaded before other modules. In order to ensure that the various modules are loaded in the proper order, each module may provide a list of conditions that must be satisfied before the module can be loaded and executed. The list of conditions is specified as a dependency expression. A dependency expression is a Boolean expression that can be evaluated to a true or false state (the terms ‘0’/‘zero’/‘false’ are used interchangeably herein, as are the terms ‘1’/‘one’/‘true’). If the dependency expression is evaluated as true, the module may be loaded immediately. If the Boolean expression is evaluated as false, the module may be loaded at a later time when the Boolean expression can be evaluated to true. If the Boolean expression cannot be evaluated as true, the module will not be loaded. In this manner, a proper order for loading each of the modules may be determined that takes into account all of the dependencies that a module may have.
Dependency expressions may include the standard Boolean operators AND, OR, and NOT, may include Boolean constants, such as ‘0’ or ‘1’, and may include Boolean variables. Boolean variables are variables that may be evaluated as true or false. One type of Boolean variable is the Globally Unique Identifier (“GUID”). Each service is assigned a GUID that uniquely identifies the service. If a GUID is specified in a dependent expression, it is necessary to evaluate the GUID by determining whether the service that the GUID refers to is currently available. If the service is available, the GUID is evaluated as true. If the service is unavailable, the GUID is evaluated as false.
Evaluation of a GUID specified within a Boolean expression can be a time consuming and memory consuming process. However, memory is very limited during certain phases of firmware initialization. There is also a desire to have each of the EFI services launched as quickly as possible. Therefore, there is a need for a method and system for efficiently evaluating a dependent expression that may include GUIDs within an EFI environment that can reduce the amount of time and memory required to evaluate the expression.